package state;

/**
 * @author: zh
 * @date: 2021/12/16 21:11
 * @version: 1.0
 */
public class Zh0202Secondary extends Zh0202Grade {
    public Zh0202Secondary(Zh0202Grade grade) {
        this.gamePlayer = grade.gamePlayer;
        this.score = grade.getScore();
    }

    @Override
    public boolean doubleScore() {
        System.out.println("赢游戏积分加倍");
        return true;
    }

    @Override
    public void checkGrade() {
        if (this.score>=200){
            gamePlayer.setGrade(new Zh0202Professional(this));
            System.out.println("恭喜您，您已经升至高手级");
        }
        else if (this.score<100){
            gamePlayer.setGrade(new Zh0202Primary(this));
        }else {
            //
        }
    }
}
